<template>
			<p class="hot-title">最新热搜</p>
				<view class="demos">
					<view class="hot-list" v-for="(item,index) in newsInfomation" :key="index">
						{{item.hot}}
					</view>
				</view>
			<p class="hot-title">热榜话题</p>
			<view class="header" v-for="(item,index) in newsInfomation" :key="index">
				{{item.news}}
			</view>
</template>

<script>
import { getdnews } from '../../utils/api/news.js'
export default{
	data(){
		return{
			newsInfomation:null
		}
	},
	created() {
		this.demo00()
	},
	methods:{
		async demo00() {
		  try {
			const dd = await getdnews();
			this.newsInfomation = dd;
			console.log('dd',dd);
		  } catch (e) {
		    console.error('user error', e);
		  }
		},
	}
}	
</script>

<style>
.header{
	width: 100%;
	height: 100rpx;
/* 	background-color: aquamarine; */
	line-height: 100rpx;
	text-indent: 72rpx;
	border-bottom: 1rpx dashed #ccc;
}
.demos{
		display: flex;
		flex-wrap: wrap;
		width: 100%;
	}
.hot-list{
	/* display: flex; */
	width: 50%;
	height: 60rpx;
	background-color: blanchedalmond;
	text-indent: 52rpx;
	line-height: 60rpx;
}
</style>

